package airacrobats.gear;

import airacrobats.io.FlapsLoader;
import airacrobats.io.ImageLoader;
import airacrobats.io.ScoreLoader;
import airacrobats.io.SoundLoader;
import airacrobats.io.SquadronLoader;
import airacrobats.io.StageLoader;
import airacrobats.io.WavefrontLoader;
import java.awt.GridBagLayout;
import javax.swing.JPanel;

/**
 * The gear class.
 */
public abstract class Gear extends JPanel
{
    /**
     * Image loader. Common to all gears.
     */
    protected static ImageLoader imageLoader;
    /**
     * Stage loader. Common to all gears.
     */
    protected static StageLoader stageLoader;
    /**
     * Score loader. Common to all gears.
     */
    protected static ScoreLoader scoreLoader;
    /**
     * Squadron loader.
     */
    protected static SquadronLoader squadronLoader;
    /**
     * Wavefront loader.
     */
    protected static WavefrontLoader wavefrontLoader;
    /**
     * Sound loader.
     */
    protected static SoundLoader soundLoader;
    /**
     * Flaps loader.
     */
    protected static FlapsLoader flapsLoader;
    /**
     * Gear listener.
     */
    protected GearListener gearListener;

    /**
     * @param gearListener The gear listener.
     */
    public Gear(GearListener gearListener)
    {
        this.gearListener = gearListener;
        
        setLayout(new GridBagLayout());
    }

    /**
     * Method called when the game is closing.
     * @return True if the game can be closed.
     */
    public boolean closing()
    {
        return true;
    }

    /**
     * Loads the gear.
     */
    public abstract void load();
}
